<?php
namespace Controller\Message;

class ShowMessage extends \Controller\Base{
    public function actionIndex(){
        $this->setMenuPath('Message', 'Lists');
        $id = $this->getInt('id');
        if($this->isPost()) {
            \Business\Message::instance()->delMessageById($id);
            $this->addSuccessMsg('删除成功!');
        }
        $info = \Business\Message::instance()->getMessageById($id);
        $this->assign('info', $info);
        $this->display();
    }
}